package com.bjpowernode.springboot.web.controller;

import com.bjpowernode.springboot.domain.User;
import com.bjpowernode.springboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * CreateTime：2020/9/1 21:05
 */

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/getUserList")
    public String getUserList(){
        userService.getUserList();
        return "接收数据成功";
    }

    @PostMapping("/insertUser")
    public String insertUser(@RequestBody User user){
        userService.insertUser(user);
        return "接收到数据";
    }

}
